<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${basePath}/public/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>接口管理</title>
<#include "lib/lib.html" />
<script type="text/javascript">

function _save(){
	if($("[name='id']").val()==''){
		$("#paramForm").attr("action","${basePath}/InterfaceParam/add.do");
	}else{
		$("#paramForm").attr("action","${basePath}/InterfaceParam/update.do");
	}
	$("#paramForm").ajaxSubmit({
		dataType : "json",
		success:function(data){
			if(data.status=="success"){
				if($("[name='paramType']").val()==1){
					window.parent.refreshReqParamList($("[name='interfaceId']").val());
				}else{
					window.parent.refreshRespParamList($("[name='interfaceId']").val());
				}
				parent.$('.btn-refresh').click();
				layer_close();
			}else{
				alert("提交失败");
			}
		}
	});
}
</script>
</head>
<body class="pos-r">
<div style="margin-left:150px;">
	<div>
		<form  method="post" class="form form-horizontal" id="paramForm" id="form-user-character-add">
			<input type="hidden" name="id" value="${(param.id)!''}"/>
			<input type="hidden" name="interfaceId" value="${(param.interfaceId)!''}"/>
			<input type="hidden" name="paramType" value="${(param.paramType)!''}"/>
			<div class="row cl">
				<label class="form-label col-2">变量名：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="paramName" value="${(param.paramName)!''}" placeholder=""    nullmsg="变量名不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">含义：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="paramDesc" value="${(param.paramDesc)!''}" placeholder=""    nullmsg="含义不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">类型：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="paramProperties" value="${(param.paramProperties)!''}" placeholder=""    nullmsg="类型不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">备注：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" name="paramRemark" value="${(param.paramRemark)!''}" placeholder=""    nullmsg="备注不能为空">
				</div>
			</div>
			<div class="row cl">
			<div class="col-10 col-offset-2">
				<button type="button" onclick="_save()" class="btn btn-success radius" ><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
		</form>
	</div>
</body>
</html>